 <?php
	print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n");
	print("<conclusions>\n");
	if(!isset($_GET["PID"]))
	{
		print("</conclusions>\n");
		return;
	}
	
    $db = mysql_connect("localhost","root","root");
    mysql_select_db("brainway");
    
	$query = "select conclusion_name.ConID ConID, conclusion_name.name name, conclusion_discription.discription discription
				from conclusion_name left join conclusion_discription on conclusion_name.ConID = conclusion_discription.ConID
				where conclusion_name.project_id=".$_GET["PID"];
	
	$result = mysql_query($query);
	$num_rows = mysql_num_rows($result);
	
	for( $row_num=0; $row_num < $num_rows; $row_num++)
	{
        $row = mysql_fetch_array($result);
        print("  <conclusion>\n");
        print("    <ConID>".$row["ConID"]."</ConID> \n");
        print("    <name>".$row["name"]."</name> \n");
        print("    <discription>".$row["discription"]."</discription> \n");
        print("  </conclusion>\n");
	}
	print("</conclusions>\n");
?>